import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
// import store from './Cstore/index'
import {create} from './utils/create.js'
import Notice from './components/Notice.vue'
import './assets/icon/index'
Vue.config.productionTip = false


const notice = ({title, message, duration}) => {
  const noticeCom = create(Notice, {
    title,
    message,
    duration,
  });
  noticeCom.show()
}
Vue.use({
  install: (_vue) => {
    _vue.mixin({
      beforeCreate() {
        _vue.prototype.$notice = notice;
      }
    });
  }
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
